package com.tom.fegin;

import com.tom.entity.Item;
import com.tom.fegin.fallback.ItemServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "item-service",fallback = ItemServiceImpl.class)
public interface ItemService {


    /**
     * 对外提供接口服务，查询商品信息
     *
     * @param id
     * @return
     */
    @GetMapping(value = "item/{id}")
    Item queryItemById(@PathVariable("id") Long id);
}
